New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zcorky/is

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zcorky/is

A TypeCheck library

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
115
increased by57.53%
Maintainers
1
Weekly downloads
 
Created
Source

is

NPM version Coverage Status Dependencies Build Status license issues

A TypeCheck lib

Install

$ npm install @zcorky/is

Usage

// typescript
import * as is from '@zcorky/is';

// primitive
is.nul(null);
is.undefined(undefined);
is.string('');
is.number(1);
is.boolean(false);
is.symbol(Symbol());

// primitive
is.primitive(true);

// array
is.array([]);

// function
is.func(() => null);

// object
is.object({});

// promise
is.promise(promise);

// date
is.date(new Date());
is.date(+ new Date());
is.date(new Date().toString());

// integer
is.integer(10);
is.int(10);
is.safeInteger(Math.pow(2, 53) - 1);
is.safeInt(Math.pow(2, 53) - 1);

// float
is.float(10.1);

Relatived

  • is - Type check values: is.string('🦄') //=> true
  • joi - Object schema validation.
  • ajv - The fastest JSON Schema Validator.
  • parameter - A parameter verify tools.
  • type-is - Infer the content-type of a request.

License

MIT © Moeover

FAQs

Package last updated on 18 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc